<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="button" value="计算两数运算结果" onclick="js()">
    <script>
        function js(){
            let x=prompt("请输入第一个数")
            let y=prompt("请输入第二个数")
            let z=prompt("请输入运算符号")
            if(z=="+"){
                alert("两数运算结果为："+x+z+y+"="+(parseInt(x)+parseInt(y)))
            }else if(z=="-"){
                alert("两数运算结果为："+x+z+y+"="+(parseInt(x)-parseInt(y)))
            }else if(z=="*"){
                alert("两数运算结果为："+x+z+y+"="+(parseInt(x)*parseInt(y)))
            }else if(z=="/"){
                alert("两数运算结果为："+x+z+y+"="+(parseInt(x)/parseInt(y)))
            }

        }
    </script>
</body>
</html>